import log4js from 'log4js';
import { app} from "electron";
import path from 'path';

log4js.configure({
	appenders: { 
		console: {type: 'console'},
		file: {
			type: 'file',
			filename: path.join(app.getPath('userData'),'/data/log/process/logs.log'),
			maxLogSize: 1024 * 1024 * 5,
			backups: 10,
		}
	},
	categories: { default: { appenders: ["console","file"], level: "error" } },
});

export default log4js.getLogger('default')